/**
 * 导航-顶部
 */
 const btn = document.querySelector('.viewMoreBtn')
 $(function() {
     getUserList()
 })
 let userList = []
 let str = ''
 
 function more() {
     $.ajax({
         url: 'http://www.xiongmaoyouxuan.com/api/tab/1/feeds?start=40&sort=0',
         type: 'get',
         dataType: 'json',
         success: function(data) {
             showUserList(data.data.list)
         }
     })
 }
 
 function getUserList() {
     $.ajax({
         url: 'http://www.xiongmaoyouxuan.com/api/tab/7?start=0',
         type: 'get',
         dataType: 'json',
         success: function(data) {
             showUserList(data.data.items.list)
         }
     })
 }
 
 function showUserList(userList) {
 
     userList.forEach(item => {
         let itemstr = `
         <li class="identify">
         <div class="commodity-card">
         < img src="${item.image}" alt="">
         <div class="msg">
             <div class="title">${item.title}</div>
             <div class="keyword">
                 <span class="tmall">天猫</span>
                 <span class="postage">包邮</span>
             </div>
             <div class="foot">
                 <span class="price-tag">¥</span>
                 <span class="price-strong">${item.price}</span>
                 <span class="price-digit"></span>
                 <span class="sale-num">${item.saleNum}人已买</span>
                 <span class="coupon-value">${item.couponValue}</span>
             </div>
         </div>
         </div>
                     </li>
         
         
         
         `
         str += itemstr
         document.querySelector('.allProduct').innerHTML = str
     });
 
 }


